package com.kifas.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "tb_stok_opname")
public class StokOpnameEntity implements Serializable {

	private static final long serialVersionUID = 3259444993976580682L;

	@Id
	@GeneratedValue
	private Long idStok;

	@ManyToOne
	@JoinColumn(name = "id_barang", nullable = false)
	private BarangEntity barang;

	@ManyToOne
	@JoinColumn(name = "id_master_gudang", nullable = false)
	private GudangEntity gudang;

	@Column(name = "bulan_kadaluarsa")
	private String bulanKadaluarsa;

	private Integer qty;

	@Column(name = "qty_lama")
	private Integer qtyLama;

	@Column(name = "qty_beli")
	private Integer qtyBeli;

	@Column(name = "qty_jual")
	private Integer qtyJual;

	@Temporal(TemporalType.TIMESTAMP)
	private Date tanggal;

	public StokOpnameEntity() {
	}

	public StokOpnameEntity(Long idStok, BarangEntity barang,
			GudangEntity gudang, String bulanKadaluarsa, Integer qty,
			Integer qtyLama, String batchProcess, Integer qtyBeli,
			Integer qtyJual, Date tanggal) {
		this.idStok = idStok;
		this.barang = barang;
		this.gudang = gudang;
		this.bulanKadaluarsa = bulanKadaluarsa;
		this.qty = qty;
		this.qtyLama = qtyLama;
		this.qtyBeli = qtyBeli;
		this.qtyJual = qtyJual;
		this.tanggal = tanggal;
	}

	public Long getIdStok() {
		return idStok;
	}

	public void setIdStok(Long idStok) {
		this.idStok = idStok;
	}

	public BarangEntity getBarang() {
		return barang;
	}

	public void setBarang(BarangEntity barang) {
		this.barang = barang;
	}

	public GudangEntity getGudang() {
		return gudang;
	}

	public void setGudang(GudangEntity gudang) {
		this.gudang = gudang;
	}

	public String getBulanKadaluarsa() {
		return bulanKadaluarsa;
	}

	public void setBulanKadaluarsa(String bulanKadaluarsa) {
		this.bulanKadaluarsa = bulanKadaluarsa;
	}

	public Integer getQty() {
		return qty;
	}

	public void setQty(Integer qty) {
		this.qty = qty;
	}

	public Integer getQtyLama() {
		return qtyLama;
	}

	public void setQtyLama(Integer qtyLama) {
		this.qtyLama = qtyLama;
	}

	public Integer getQtyBeli() {
		return qtyBeli;
	}

	public void setQtyBeli(Integer qtyBeli) {
		this.qtyBeli = qtyBeli;
	}

	public Integer getQtyJual() {
		return qtyJual;
	}

	public void setQtyJual(Integer qtyJual) {
		this.qtyJual = qtyJual;
	}

	public Date getTanggal() {
		return tanggal;
	}

	public void setTanggal(Date tanggal) {
		this.tanggal = tanggal;
	}

}
